home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
asm
/
utils
/
recoqlib
/
demo
/
testreq.s
< prev
Wrap
Text File
|
1980-01-03
|
1KB
|
70 lines
* TestReq.s demo source for recoq.library *
* Written by Cath of LsD *
* recoq.library by Cath of LsD *
* compiles under devpac 3.00 with system gs *
incdir xnclude:asm/ ; your include path
include libraries/recoq.i
include libraries/recoq_lib.i
section code,code
lea RecoqLibName(pc),a1
moveq #0,d0 ; Version of library
CALLEXEC OpenLibrary ; open library
move.l d0,_RecoqBase ; Store ptr to library
tst.l d0
beq.s NoLibrary ; Oh come on guys sort it out
lea DosLibName(pc),a1
moveq #0,d0 ; Version code
CALLEXEC OpenLibrary ; open library
move.l d0,_DOSBase
move.l d0,a6
CALLDOS Output ; get output handle in d0
move.l d0,_Output ; store it
lea Buffer(pc),a0 ; get ptr to buffer
CALLRECOQ rqWhatIs ; call function
; Returns ptr to string in d2
; And length in d3
; String is also zero terminated (ASCIZ)
; so by moving d2 to d1 you can use PutStr instead
move.l _Output(pc),d1 ; output handle
CALLDOS Write ; write to default output
move.l _RecoqBase(pc),a1 ; close library
CALLEXEC CloseLibrary
NoLibrary
move.l _DOSBase(pc),a1 ; close library
CALLEXEC CloseLibrary
clr.l d0 ; exit to dos
rts ; with no error code
_RecoqBase
dc.l 0
_DOSBase
dc.l 0
_Output
dc.l 0
DosLibName
DOSNAME
RecoqLibName
RECOQNAME
Buffer
incbin sys:disk.info ; include a crunched file here !
END